package com.wish.g1.finance.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wish.g1.common.core.web.controller.BaseController;
import com.wish.g1.common.core.web.page.TableDataInfo;
import com.wish.g1.common.security.annotation.RequiresPermissions;
import com.wish.g1.finance.entity.Capital;
import com.wish.g1.finance.service.ICapitalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 资方 前端控制器
 * </p>
 *
 * @author wxh
 * @since 2022-11-18
 */
@RestController
@RequestMapping("/capital")
public class CapitalController extends BaseController {
    @Autowired
    private ICapitalService capitalService;

    /**
     * 查询资方列表
     */
    @RequiresPermissions("finance:capital:list")
    @GetMapping("/list")
    public TableDataInfo list(Capital capital)
    {
        QueryWrapper<Capital> wrapper = new QueryWrapper<>();
        wrapper.setEntity(capital);
        startPage();
        List<Capital> list = capitalService.list(wrapper);
        return getDataTable(list);
    }

}
